package com.bbs.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.bbs.mapper.UserMapper;
import com.bbs.pojo.User;
@Service
public class UserServiceImpl implements UserService{

	@Autowired
	private UserMapper userMapper;
	
	//用户注册
	@Override
	public void regist(User user) {
		userMapper.regist(user);
	}
	//ajax
		@Override
		public List<User> findUsername(String username) {
			
			return userMapper.findUser(username);
		}
	
	//用户登录
	@Override
	public User login(String username, String password) {
		// TODO Auto-generated method stub
		return userMapper.login(username, password);
	}
	
	
}
